<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        h2{
            margin: 10px;
        }
        .header{
            display: flex;
            align-items: center;
        }
        .header input{
            flex: 1;
            margin: 10px;
            padding-left: 10px;
            height: 40px;
            background: #f5f5f5;
            border: none;
            outline: none;
            border-radius: 20px;
        }
        .header span{
            width: 60px;
            margin: 10px;
            font-size: 24px;
            color: rgb(37, 92, 186);
        }
        h3{
            margin: 10px;
        }
        .main span{
            margin: 8px;
            display: inline-block;
            background: rgb(210, 208, 208);
            padding: 5px;
            border-radius: 5px;
        }
        .footer span{
            margin: 6px;
            display: inline-block;
            background: rgb(187, 187, 187);
            padding: 5px;
            border-radius: 5px;
        }
    </style>
</head>
<body>
    <div id="search">
        <h2>搜索</h2>
        <div class="header">
            <input type="text" placeholder="搜索商家、商品名称" v-model="inputText">
            <span @click="add()">搜索</span>
        </div>
        <div class="main">
            <h3>历史搜索</h3>
            <span v-for="(item,index) in arr">{{item}}</span>
        </div>
        <div class="footer">
            <h3>搜索发现</h3>
            <span v-for="(item,index) in arrSearch">{{item}}</span>
        </div>
    </div>
    <script src="vue.js"></script>
    <script src="搜索.js"></script>
</body>
</html>